<template>
	<view class="sort-game">
	
		
		<view class="game">
			<view class="biaoti">{{$t('sort.game.game')}}</view>
			<view class="box2">
				<view class="games" v-for="(a,b) in game" :key="b" @click="goGame(a)">
					<view class="shebs">
						
					<image :src="a.image" mode=""></image>
					<view class="shebz">
					<text>{{a.name}}</text>
					</view>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	import api from '../../common/api.js'
	export default {
		data() {
			return {
				game:''
			};
		},
		methods:{
			goGame(a){
				console.log(a);
			}
		},
		created() {
			console.log(1);
			this.$api.sendRequest({
					url: api.GOOD_ITC,
					data: {
						
					},
					success: res => {
						console.log(res.data[1].child);
							this.game=res.data[1].child
						
						for(var a of this.game){
							a.image=api.HOST+a.image
						}
					}
				});
			// console.log(api.HOST);
		}
	}
</script>

<style scoped>

	h3{
		text-align: center;
	}
	.head {
		background: linear-gradient(to bottom, #DCEAFF 0%, #FFFFFF 50%);
		margin-bottom: 20rpx;
	}
	.biaoti{
		font-weight: bold;
		margin-left: 40rpx;
		font-family: Microsoft YaHei;
	}
	.box1{
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
	}
	.shebs{
		width: 200rpx;
		height: 200rpx;
		background-color: white;
		margin: 16rpx;
		border-radius: 16rpx;
		box-shadow: 0px 10rpx 60rpx rgba(0, 0, 0, 0.06);
	}
	image{
		width: 62rpx;
		height: 40rpx;
		margin-left: 66rpx;
		margin-top: 30rpx;
		
	}
	.shebz{
		margin-top: 40rpx;
		text-align: center;
		}
	.shebz>text{
		font-weight: 28rpx;
		font-weight: bold;
		opacity: .8;
	}
</style>
